package com.zh.note.huawei.onehundred.报数;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @Author: zhanghuan
 * @date: 2023/9/3 10:40
 * @description: create it
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        if (m <= 1 || m >= 100) {
            System.out.println("ERROR");
            return;
        }

        List<Integer> list = new ArrayList<>();
        for (int i = 1; i <= 100; i++) {
            list.add(i);
        }
        // 模拟报数
        int currentNum = 0; // 当前报数到哪
        int index = 0; // 当前谁在报数
        while (list.size() >= m) {
            currentNum++;
            if (currentNum == m) {
                list.remove(index);
                currentNum = 0;
            } else {
                index++;
            }
            if (index == list.size()) {
                index = 0;
            }
        }
        //输出结果
        for (int i = 0; i < list.size(); i++) {
            System.out.print(list.get(i));
            if (i != list.size() - 1) {
                System.out.print(",");
            }
        }

    }
}
